<script setup>
import { ref } from 'vue';
import Child from './08-defineEmits-Child.vue';

const money = ref(100);
const car = ref('玛莎拉蒂');

const changeMoney = num => {
  money.value -= num;
};
</script>

<template>
  <div>我是父组件</div>
  <div>money: {{ money }}</div>
  <div>car: {{ car }}</div>
  <hr />
  <Child :money="money" :car="car" @change-money="changeMoney" />
</template>
